{{for image in images:}}
<div class="slaps"><div id="{{=image.id}}" class="slapimg" title="{{=image.image+'^'+image.img_name+'^'+image.redirect}}" style="background-image: url('{{=URL('download', args=image.image)}}'); background-position: center bottom;background-repeat:no-repeat;"><a href="javascript:void(0);"><img src="{{=URL(c='static', f='images/100x100clear.png')}}" style="border: 0;"></a></div></div>
{{pass}}
<script>
$(document).ready(function(){
	$(".slaps").click(function() { 
	var data = $(this).find('div:first').attr('id');
	$(this).hide();
	   $.ajax({  
			type: "POST",  
			url: "{{=URL(f='del_img')}}",  
			data: "id="+data,  
			success: function(msg){   
			   $("#output").ajaxComplete(function(event, request, settings){ 
					$(this).html(msg);
			   });
			refresh_images();
			}   
		});
	});
});
</script>